CREATE TABLE [dbo].[App_presup_cab]
(
[id_presup] [dbo].[_codigo] NOT NULL,
[fecha] [dbo].[_fechahora] NULL,
[id_entidad] [dbo].[_codigo] NULL,
[fecha_entrega] [dbo].[_fechahora] NULL,
[fecha_pago] [dbo].[_fechahora] NULL,
[total] [dbo].[_importe] NULL,
[observaciones] [dbo].[_descripcion] NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[App_presup_cab] ADD CONSTRAINT [PK_presup_cab] PRIMARY KEY CLUSTERED  ([id_presup]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[App_presup_cab] ADD CONSTRAINT [FK_presup_cab_entidad] FOREIGN KEY ([id_entidad]) REFERENCES [dbo].[App_entidad] ([id_entidad])
GO
EXEC sp_bindefault N'[dbo].[date]', N'[dbo].[App_presup_cab].[fecha]'
GO
EXEC sp_bindefault N'[dbo].[date]', N'[dbo].[App_presup_cab].[fecha_entrega]'
GO
EXEC sp_bindefault N'[dbo].[date]', N'[dbo].[App_presup_cab].[fecha_pago]'
GO
EXEC sp_bindefault N'[dbo].[cero]', N'[dbo].[App_presup_cab].[total]'
GO
EXEC sp_addextendedproperty N'MS_Description', N'(comercio)', 'SCHEMA', N'dbo', 'TABLE', N'App_presup_cab', 'COLUMN', N'id_entidad'
GO
